package com.yanqu.road.dataHelper.action.excel;


import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;

public class ZhouNianQingRankData {
    private int activityId;
    private long serverId;
    private long userId;
    private int type;
    private String value;
    private String otherValue = "";
    private long dataTime;
    private String kv = "";

    //缓存 level,count
    Map<Integer, Integer> mammonCountMap = new HashMap<>();

    //缓存 赚钱
    BigInteger earnSpeed = BigInteger.ZERO;

    public static String OTHER_VALUE_SEPARATOR = "@#";

    public ZhouNianQingRankData(int activityId, long serverId, long userId, int type, String value) {
        this.activityId = activityId;
        this.serverId = serverId;
        this.userId = userId;
        this.type = type;
        this.value = value;
    }

    public long getUserId() {
        return userId;
    }

    public int getType() {
        return type;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getActivityId() {
        return activityId;
    }

    public long getServerId() {
        return serverId;
    }

    public String getOtherValue() {
        return otherValue;
    }

    public void setOtherValue(String otherValue) {
        this.otherValue = otherValue;
    }

    public long getDataTime() {
        return dataTime;
    }

    public void setDataTime(long dataTime) {
        this.dataTime = dataTime;
    }

    public String getKv() {
        return kv;
    }

    public void setKv(String kv) {
        this.kv = kv;
    }

    public String toInsertSql(int rank) {
        StringBuffer stringBuffer = new StringBuffer("insert into `t_c_activity_mammon_hall_source` (`userId`, `serverId`, `type`, `activityId`, `dataTime`, `rank`, `value`, `otherString`, `kvList`) VALUES ");
        stringBuffer.append("( ");
        stringBuffer.append("'").append(userId).append("',");
        stringBuffer.append("'").append(serverId).append("',");
        stringBuffer.append("'").append(type).append("',");
        stringBuffer.append("'").append(activityId).append("',");
        stringBuffer.append("'").append(dataTime).append("',");
        stringBuffer.append("'").append(rank).append("',");
        stringBuffer.append("'").append(value).append("',");
        stringBuffer.append("'").append(otherValue).append("',");
        stringBuffer.append("'").append(kv).append("'");
        stringBuffer.append(" )");
        return stringBuffer.toString();
    }

    public Map<Integer, Integer> getMammonCountMap() {
        return mammonCountMap;
    }

    public BigInteger getEarnSpeed() {
        return earnSpeed;
    }

    public void setEarnSpeed(BigInteger earnSpeed) {
        this.earnSpeed = earnSpeed;
    }
}
